#include <iostream>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <dirent.h>
#include <unistd.h>
#include <vector>
#include <sstream>
#include <fstream>
#include <sys/io.h>
#include <sys/times.h>
#include <iomanip> // setw()
using namespace std;

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
using namespace cv;

#pragma once  
class calTwoPoint  
{  
public:  
    calTwoPoint(CvPoint pointO,CvPoint pointA);  
    ~calTwoPoint(void);  
  
    CvPoint2D32f get_unit_vector();//根据两点获取单位向量  
    CvPoint2D32f get_unit_vertical_vector(bool type = true);//根据两点获取垂直单位向量  
    double get_distance ();    //获取两点之间的距离   
    double get_angle() ;       //已知2个坐标点，求从 0------->x 逆时针需旋转多少角度到该位置  
    double get_line_angle();     
    CvPoint point_add();       //两点相加  
private:  
    CvPoint pointO;  
    CvPoint pointA;  
  
    double get_angle2(CvPoint pointO,CvPoint pointA)  ;  
};  
